package com.example.helloword.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloController {
    //http://localhost:8080/hi
    ////http://localhost:8080/hi?nickname=zhangsan&phone = 123
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public String  hello(String nickname,String phone) {
        System.out.println(nickname);
        return "你好!" + nickname + phone;
    }
}
